
$.extend($.fn.validatebox.defaults.rules, {   
    minLength: {   
        validator: function(value, param){   
            return value.length >= param[0];   
        },   
        message: 'Please enter at least {0} characters.'  
    },
    maxLength:{
    	 validator: function(value, param){   
             return value.length <= param[0];   
         },   
         message: 'Please enter at most {0} characters.'  
    }
});

$.extend($.fn.validatebox.methods, {
	getValue : function(jq) {
		return jq.each(function() {
			$(this);
		}).val();
	},
	onBlur : function(jq,caller){
		return jq.each(function(){
			$(this).bind("blur.validatebox",function(e){
					caller($(this).val());
				});
		});
	}  
}); 


$.extend($.fn.datagrid.defaults.editors, {  
    text: {  
        init: function(container, options){  
            var input = $('<input type="text" class="easyui-dialog">').appendTo(container);  
            return input;  
        },  
        getValue: function(target){  
            return $(target).val();  
        },  
        setValue: function(target, value){  
            $(target).val(value);  
        },  
        resize: function(target, width){  
            var input = $(target);  
            if ($.boxModel == true){  
                input.width(width - (input.outerWidth() - input.width()));  
            } else {  
                input.width(width);  
            }  
        }  
    }  
});  

$.extend($.fn.panel.methods, {
		mouseout : function(jq,caller){
			return jq.each(function(){
				$(this).bind("mouseleave.panel",function(e){
						caller($(this).val());
					});
			});
		}  
	}); 

